Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some convert/binding fixes #442

Merged

Conversation

mickaelistria
Copy link

No description provided.

@@ -1349,6 +1356,9 @@ private Expression convertExpressionImpl(JCExpression javac) {
.map(JCVariableDecl.class::cast)
.map(this::convertVariableDeclarationForLambda)
.forEach(res.parameters()::add);
int arrowIndex = this.rawText.indexOf("->", jcLambda.getStartPosition());
int parenthesisIndex = this.rawText.indexOf(")", jcLambda.getStartPosition());
res.setParentheses(parenthesisIndex >= 0 && parenthesisIndex < arrowIndex);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if there's no opening ( ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we most likely receive a JCErroneous instead of a JCLambda

@mickaelistria mickaelistria force-pushed the some-fixes branch 2 times, most recently from e785794 to 2b3cfac Compare May 31, 2024 09:26
@mickaelistria
Copy link
Author

Fixes ~60 tests

@mickaelistria mickaelistria merged commit 4d4d633 into eclipse-jdtls:dom-with-javac May 31, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants